<template>
	<view style="line-height: 0;">
		<u-parse :html="images"></u-parse>
		<img :src="src" style="max-width: 100%;height:auto;">
		<wx-share :title='shop.name' :desc="shop.store_introduction" :imgUrl="shop.cover" link="/" ref="wxs"></wx-share>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				images:'',
				src:'',
				shop:{}
			}
		},
		created() {
			this.getShop()
			this.getPoster()
		},
		methods: {
			getPoster() {
				this.$u.post('/poster/db-poster', {}).then(res => {
					console.log(res)
					// if(res && res.image) {
					// 	this.src = res.image;
					// }
					console.log(res.length)
					if(res.length>0){
						let html = ""
						for(let i=0;i<res.length;i++){
							console.log(res[i])
							html+='<img src="'+res[i]+'">'
						}
						this.images = html

					}
				}).catch(e => {
						console.log(e)
				})
			},
			getUserInfo() {
				this.$u.post('/user/info', {}).then(res => {
					this.user = res;
					if (this.user.referral_id == 0) {
						this.user.referral_id = '';
					}
				}).catch(e => {
					console.log(e)
				})
			},
			getShop() {
				this.$u.post('/shopping/shop-setting', {}).then(res => {
					this.shop = res;
				}).catch(e => {

				})
			}
		}
	}
</script>

<style>

</style>
